// import request from '../utils/axios.js'
import axios from "../utils/axios"

// // 编写示例
// export const test = (data) => {
//     return request({
//         url: `/user/test`,
//         method: 'post',
//         data: data
//     })
// }

export const login = (user)=>{
    return axios({
        url:"/user/login",
        method: 'post',
        data: user
    })
}
export const selectUserInfo =(uid)=>{
    return axios({
        url:`/user/${uid}`,
        method:'get'
    })
}

export const changeUserInfo = (user)=>{
    return axios({
        url:'/user',
        method:'put',
        data: user
    })
}